package com.mallcloud.mall.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 社交登录类型
 */
@Getter
@AllArgsConstructor
public enum LoginTypeEnum {

	PWD("PWD", "账号密码登录"),
	SMS("SMS", "验证码登录"),
	QQ("QQ", "QQ登录"),
	WECHAT("WX", "微信登录"),
	MINI_APP("MINI", "微信小程序"),
	GITEE("GITEE", "码云登录"),
	OSC("OSC", "开源中国登录"),
	DINGTALK("DINGTALK", "钉钉"),
	WEIXIN_CP("WEIXIN_CP", "企业微信"),
	CAS("CAS", "CAS 登录"),
	;

	private String type;
	private String description;

	public static String getDecs(String type) {
		return Arrays.stream(values()).filter(x -> x.getType().equals(type)).findFirst().get().getDescription();
	}

}
